import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class CreateArticleDto {
  @ApiProperty({ description: '文章标题' })
  @IsNotEmpty()
  @IsString()
  title: string;

  @ApiProperty({ description: '文章标题' })
  @IsNotEmpty()
  @IsString()
  content: string;

  @ApiProperty({ description: '文章标题' })
  @IsNotEmpty()
  @IsString()
  userId: string;
}
